package wechat.base.snd;

import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import wechat.base.snd.encoding.JsonPut;

@SuppressWarnings("all")
public class WCTemplateContent {
  private JsonPut all = new JsonPut();
  
  public void withFirstItem(final String data) {
    this.setTemplate("first", data);
  }
  
  public void withKeyword1Item(final String data) {
    this.setTemplate("keyword1", data);
  }
  
  public void withKeyword2Item(final String data) {
    this.setTemplate("keyword2", data);
  }
  
  public void withKeyword3Item(final String data) {
    this.setTemplate("keyword3", data);
  }
  
  public void withRemarkItem(final String data) {
    this.setTemplate("remark", data);
  }
  
  public void setTemplate(final String Key, final String data) {
    JsonPut _jsonPut = new JsonPut();
    final Procedure1<JsonPut> _function = new Procedure1<JsonPut>() {
      public void apply(final JsonPut it) {
        it.putObj("value", data);
      }
    };
    JsonPut _doubleArrow = ObjectExtensions.<JsonPut>operator_doubleArrow(_jsonPut, _function);
    this.all.putObj(Key, _doubleArrow);
  }
  
  public JsonPut getAllContent() {
    return this.all;
  }
}
